package zack.project.domain.strategy.model.entity;


import lombok.*;

/**
 * @author A1793
 * 规则行为策略，根据用户配置的rule_model可以将抽奖行为分为抽奖前，抽奖中，抽奖后，这些抽奖行为实体都继承RaffleEntity，
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RuleActionEntity<T extends RuleActionEntity.RaffleEntity> {
    private  String code;
    private  String info;
    private  T data;
    private String ruleModel;

    static  public class RaffleEntity{


    }
    @EqualsAndHashCode(callSuper = true)
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    static  public class RaffleBeforeEntity extends RaffleEntity{
        /**
         * 策略ID
         */
        private Long strategyId;

        /**
         * 权重值Key；用于抽奖时可以选择权重抽奖。
         */
        private String ruleWeightValueKey;

        /**
         * 奖品ID；
         */
        private Integer awardId;


    }
    static  public class RuleAfterEntity extends RaffleEntity{}
    static  public class RaffleCenterEntity extends RaffleEntity{}
}
